#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Project: spd-sxmcc
"""
@author: lyndon
@time Created on 2019/2/27 17:03
@desc
"""
import os
from threadpool.pool_task.plogging import Plog

logFormatDict = {
        'standard_format': '[%(asctime)s][%(threadName)s:%(thread)d][task_id:%(name)s][%(filename)s:%(lineno)d]' \
                           '[%(levelname)s][%(message)s]',  # 其中name为getlogger指定的名字
        'simple_format': '[%(levelname)s][%(asctime)s][%(filename)s:%(lineno)d]%(message)s',
        'id_simple_format': '[%(levelname)s][%(asctime)s] %(message)s',
        'simple_format_info': '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
    }
loggerLevel = 'DEBUG:INFO'
loggerFormat = 'standard_format'
loggerDir = r'D:\iProject\myPython\com\teradata\threadpool\pool_task\logs'
loggerFileName = 'sync_system.log'
logFileName = loggerDir + os.sep + loggerFileName

log = Plog()
log.set_logger(when='D', limit=1, level=loggerLevel, filename=logFileName, mode='w', fmt=logFormatDict[loggerFormat])
log = log.get_logger_instance()
